package com.iris.live.services.data.repositories;

import com.iris.live.services.data.models.Lsh精品图片Model;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created by sxy on 2016/7/11.
 */
@Transactional
public interface Lsh精品图片Repository extends JpaRepository<Lsh精品图片Model, Integer>, JpaSpecificationExecutor<Lsh精品图片Model> {

    @Query("select a from Lsh精品图片Model a where a.精品编号=?1")
    List<Lsh精品图片Model> findPicRecordByQualityId(int id);

    @Modifying
    @Query("update Lsh精品图片Model a set a.图片路径=?1 where a.图片编号=?2")
    public void updateById(String path,int id);
}
